3.2.58 \(\int (a+b \log (c x^n)) (d+e \log (f x^r)) \, dx\) [158]

Optimal. Leaf size=77 \[ b e n r x-e (a-b n) r x-b e r x \log \left (c x^n\right )+a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right ) \]

[Out]

b*e*n*r*x-e*(-b*n+a)*r*x-b*e*r*x*ln(c*x^n)+a*x*(d+e*ln(f*x^r))-b*n*x*(d+e*ln(f*x^r))+b*x*ln(c*x^n)*(d+e*ln(f*x
^r))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2332, 2408} \begin {gather*} -e r x (a-b n)+a x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-b e r x \log \left (c x^n\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b e n r x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

b*e*n*r*x - e*(a - b*n)*r*x - b*e*r*x*Log[c*x^n] + a*x*(d + e*Log[f*x^r]) - b*n*x*(d + e*Log[f*x^r]) + b*x*Log
[c*x^n]*(d + e*Log[f*x^r])

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2408

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.)), x_Symbol] :> With[{u =
IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[SimplifyIntegrand[u/x, x], x],
 x]] /; FreeQ[{a, b, c, d, e, f, n, p, r}, x]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right ) \, dx &=a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-(e r) \int \left (a-b n+b \log \left (c x^n\right )\right ) \, dx\\ &=-e (a-b n) r x+a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-(b e r) \int \log \left (c x^n\right ) \, dx\\ &=b e n r x-e (a-b n) r x-b e r x \log \left (c x^n\right )+a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 58, normalized size = 0.75 \begin {gather*} x \left (a d-b d n-a e r+2 b e n r+e (a-b n) \log \left (f x^r\right )+b \log \left (c x^n\right ) \left (d-e r+e \log \left (f x^r\right )\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

x*(a*d - b*d*n - a*e*r + 2*b*e*n*r + e*(a - b*n)*Log[f*x^r] + b*Log[c*x^n]*(d - e*r + e*Log[f*x^r]))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.14, size = 1503, normalized size = 19.52

method result size
risch \(\text {Expression too large to display}\) \(1503\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*(d+e*ln(f*x^r)),x,method=_RETURNVERBOSE)

[Out]

-1/2*I*Pi*a*e*x*csgn(I*f*x^r)^3-1/4*Pi^2*b*e*x*csgn(I*f)*csgn(I*f*x^r)^2*csgn(I*c)*csgn(I*c*x^n)^2-1/4*Pi^2*b*
e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n)^3+1/2*I*Pi*a*e*x*csgn(I*f)*csgn(I*f*x^r)^2+1/2*I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2*x-1/4*Pi^2*b*e*x*csgn
(I*f*x^r)^3*csgn(I*c*x^n)^3-1/4*Pi^2*b*e*x*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)*csgn(I*c)*csgn(I*x^n)*csgn(I*c*
x^n)+1/2*I*Pi*a*e*x*csgn(I*x^r)*csgn(I*f*x^r)^2-1/2*I*Pi*b*e*x*csgn(I*f*x^r)^3*ln(x^n)-1/2*I*Pi*ln(f)*b*e*x*cs
gn(I*c*x^n)^3+1/4*Pi^2*b*e*x*csgn(I*f)*csgn(I*f*x^r)^2*csgn(I*c*x^n)^3+1/4*Pi^2*b*e*x*csgn(I*x^r)*csgn(I*f*x^r
)^2*csgn(I*c*x^n)^3-1/2*I*Pi*ln(f)*b*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 86, normalized size = 1.12 \begin {gather*} -b d n x + {\left ({\left (2 \, r - \log \left (f\right )\right )} x - x \log \left (x^{r}\right )\right )} b n e - a r x e + b d x \log \left (c x^{n}\right ) - {\left (r x - x \log \left (f x^{r}\right )\right )} b e \log \left (c x^{n}\right ) + a x e \log \left (f x^{r}\right ) + a d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="maxima")

[Out]

-b*d*n*x + ((2*r - log(f))*x - x*log(x^r))*b*n*e - a*r*x*e + b*d*x*log(c*x^n) - (r*x - x*log(f*x^r))*b*e*log(c
*x^n) + a*x*e*log(f*x^r) + a*d*x

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 115, normalized size = 1.49 \begin {gather*} b n r x e \log \left (x\right )^{2} + {\left (2 \, b n - a\right )} r x e - {\left (b d n - a d\right )} x - {\left (b r x e - b d x\right )} \log \left (c\right ) + {\left (b x e \log \left (c\right ) - {\left (b n - a\right )} x e\right )} \log \left (f\right ) + {\left (b r x e \log \left (c\right ) + b n x e \log \left (f\right ) + b d n x - {\left (2 \, b n - a\right )} r x e\right )} \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="fricas")

[Out]

b*n*r*x*e*log(x)^2 + (2*b*n - a)*r*x*e - (b*d*n - a*d)*x - (b*r*x*e - b*d*x)*log(c) + (b*x*e*log(c) - (b*n - a
)*x*e)*log(f) + (b*r*x*e*log(c) + b*n*x*e*log(f) + b*d*n*x - (2*b*n - a)*r*x*e)*log(x)

________________________________________________________________________________________

Sympy [A]
time = 0.44, size = 97, normalized size = 1.26 \begin {gather*} a d x - a e r x + a e x \log {\left (f x^{r} \right )} - b d n x + b d x \log {\left (c x^{n} \right )} + 2 b e n r x - b e n x \log {\left (f x^{r} \right )} - b e r x \log {\left (c x^{n} \right )} + b e x \log {\left (c x^{n} \right )} \log {\left (f x^{r} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*(d+e*ln(f*x**r)),x)

[Out]

a*d*x - a*e*r*x + a*e*x*log(f*x**r) - b*d*n*x + b*d*x*log(c*x**n) + 2*b*e*n*r*x - b*e*n*x*log(f*x**r) - b*e*r*
x*log(c*x**n) + b*e*x*log(c*x**n)*log(f*x**r)

________________________________________________________________________________________

Giac [A]
time = 4.54, size = 122, normalized size = 1.58 \begin {gather*} b n r x e \log \left (x\right )^{2} - 2 \, b n r x e \log \left (x\right ) + b r x e \log \left (c\right ) \log \left (x\right ) + b n x e \log \left (f\right ) \log \left (x\right ) + 2 \, b n r x e - b r x e \log \left (c\right ) - b n x e \log \left (f\right ) + b x e \log \left (c\right ) \log \left (f\right ) + b d n x \log \left (x\right ) + a r x e \log \left (x\right ) - b d n x - a r x e + b d x \log \left (c\right ) + a x e \log \left (f\right ) + a d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="giac")

[Out]

b*n*r*x*e*log(x)^2 - 2*b*n*r*x*e*log(x) + b*r*x*e*log(c)*log(x) + b*n*x*e*log(f)*log(x) + 2*b*n*r*x*e - b*r*x*
e*log(c) - b*n*x*e*log(f) + b*x*e*log(c)*log(f) + b*d*n*x*log(x) + a*r*x*e*log(x) - b*d*n*x - a*r*x*e + b*d*x*
log(c) + a*x*e*log(f) + a*d*x

________________________________________________________________________________________

Mupad [B]
time = 3.78, size = 66, normalized size = 0.86 \begin {gather*} x\,\left (a\,d-b\,d\,n-a\,e\,r+2\,b\,e\,n\,r\right )+\ln \left (f\,x^r\right )\,\left (a\,e\,x-b\,e\,n\,x+b\,e\,x\,\ln \left (c\,x^n\right )\right )+b\,x\,\ln \left (c\,x^n\right )\,\left (d-e\,r\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*log(f*x^r))*(a + b*log(c*x^n)),x)

[Out]

x*(a*d - b*d*n - a*e*r + 2*b*e*n*r) + log(f*x^r)*(a*e*x - b*e*n*x + b*e*x*log(c*x^n)) + b*x*log(c*x^n)*(d - e*
r)

________________________________________________________________________________________